<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/11
  Time: 16:33
  To change this template use File | Setztings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="public-bgContent"  >
    <div class="way-yellow">贷款方式：<!-- ngIf: _content.loan_way==1 --><span class=" loan_way"></span>
        <!-- end ngIf: _content.loan_way==1 --><!-- ngIf: _content.loan_way==2 --><!-- ngIf: _content.loan_way==3 -->
        （同一订单不同文档合同编号相同，请选择下面的文档）
    </div>
    <div class="contrac-gro">
        合同编号：<input class="put-not ng-pristine ng-untouched ng-valid ng-empty newNum-input" placeholder="请输入合同编号"
                    id="contract_no">&nbsp;&nbsp;或&nbsp;&nbsp;<span class="new-contra"
                                                                    ng-click="getNewCon()">生成新的合同编号</span>
    </div>
    <!--导航 借款信息 借款人资料房贷历史 资料清单-->
    <%--<ul id="repayDoc_content"></ul>--%>

    <ul class="public-PoBefore-nav repayplan-PoBefore-nav" style="overflow: hidden; height: inherit; margin-bottom: 5px">
        <%--<li id="repayDoc_content" class=""></li>--%>
        <script id="repayDoc_content_tpl" type="x-handlebars-template">
            {{#each content.selectDocList}}
            <li style="margin-bottom: 3px">
            <span><a href="javascript:void(0)" data-indx="0"
                     ng-click="clickLi($event)"
                     class="">{{doc_name}}</a></span>

            <span style="display: none;" id="doc_number{{@index}}">{{doc_number}}</span>
            {{/each}}
            </li>
        </script>
        <!-- end ngRepeat: (key,i) in selectDocList -->
        <li><span><a ng-click="show('payPlan',$event,'assess');addShow('payPlan')" href="javascript:void(0)"
                     class="activePublic">还款计划表</a></span>
        </li>
    </ul>


    <div id="repayDoc_content2" style="margin-top: -8px;"></div>
    <script id="repayDoc_content_tpl2" type="x-handlebars-template">
        {{#each content.selectDocList}}
        <div class="public-content">
            <%--模板id--%>
            <span style="display: none;" id="doc_id{{@index}}">{{id}}</span>

            <renewtemplate-input style="">
                <div style="">
                    <div id="add_doc_div" class="public-bgContent bgContainer" ng-init="load()" style="padding:0">


                        <!--占位用-->
                        <div class="public-content bigerBott biggerBo" style="">
                            <div class="set-title-name">
                                把鼠标键入到要显示下面字段，然后点击下面要显示的字段
                            </div>
                            <div class="input-word input-title-first D-messg-span">
                                <span data-placehold='{$contract_no}'>合同编号</span>
                                <span data-placehold='{$real_name}'>借款人1</span>
                                <span data-placehold='{$mate_name}'>借款人2</span>
                                <span data-placehold='{$id_card}'>借款人1身份证号码</span>
                                <span data-placehold='{$mate_id_card}'>借款人2身份证号码</span>
                                <span data-placehold='{$resident_place}'>户口所在地</span>
                                <span data-placehold='{$now_address}'>居住地址</span>
                                <span data-placehold='{$cellphone}'>借款人1手机号码</span>
                                <span data-placehold='{$mate_cellphone}'>借款人2手机号码</span>
                                <span data-placehold='{$payee}'>收款人</span>
                                <span data-placehold='{$bank}'>开户银行</span>
                                <span data-placehold='{$account}'>收款账号</span>
                                <span data-placehold='{$getLoan_upper}'>借款金额 大写</span>
                                <span data-placehold='{$getLoan_lower}'>借款金额 小写</span>
                                <span data-placehold='{$loan_amount_upper}'>放款金额 大写</span>
                                <span data-placehold='{$loan_amount_lower}'>放款金额 小写</span>
                                <%--<span data-placehold='{$interest}'>利率</span>--%>
                                <span data-placehold='{$at_name}'>借款期限</span>
                                <span data-placehold='{$loan_time}'>借款开始日期</span>
                                <span data-placehold='{$due_time}'>借款到期日期</span>
                                <span data-placehold='{$loan_number}'>借款编号</span>
                                <span data-placehold='{$get_year}'>年</span>
                                <span data-placehold='{$get_month}'>月</span>
                                <span data-placehold='{$get_day}'>日</span>
                                <span data-placehold='{$date}'>日期</span>
                                <span data-placehold='{$interest}'>利率</span>
                            </div>
                            <!--<div class="set-title-name">
                                <script id="msg_cont" type="text/plain" style="width:870px;height:300px;margin: auto;">

                            </div>-->
                            <div id="msg_cont{{@index}}" style="" class="edui-default">
                                <div id="newDiv{{@index}}" style="">


                                </div>

                            </div>
                            <p class="doc_content_{{@index}}" style="display: none"> {{doc_content}}</p>
                            <div class="set-title-name set-title-name-last">
                                把鼠标键入到要显示下面字段，然后点击下面要显示的字段
                            </div>
                            <div class="input-word input-title-first D-messg-span input-word-last">
                                <span data-placehold='{$contract_no}'>合同编号</span>
                                <span data-placehold='{$real_name}'>借款人1</span>
                                <span data-placehold='{$mate_name}'>借款人2</span>
                                <span data-placehold='{$id_card}'>借款人1身份证号码</span>
                                <span data-placehold='{$mate_id_card}'>借款人2身份证号码</span>
                                <span data-placehold='{$resident_place}'>户口所在地</span>
                                <span data-placehold='{$now_address}'>居住地址</span>
                                <span data-placehold='{$cellphone}'>借款人1手机号码</span>
                                <span data-placehold='{$mate_cellphone}'>借款人2手机号码</span>
                                <span data-placehold='{$payee}'>收款人</span>
                                <span data-placehold='{$bank}'>开户银行</span>
                                <span data-placehold='{$account}'>收款账号</span>
                                <span data-placehold='{$getLoan_upper}'>借款金额 大写</span>
                                <span data-placehold='{$getLoan_lower}'>借款金额 小写</span>
                                <span data-placehold='{$loan_amount_upper}'>放款金额 大写</span>
                                <span data-placehold='{$loan_amount_lower}'>放款金额 小写</span>
                                <%--<span data-placehold='{$interest}'>利率</span>--%>
                                <span data-placehold='{$at_name}'>借款期限</span>
                                <span data-placehold='{$loan_time}'>借款开始日期</span>
                                <span data-placehold='{$due_time}'>借款到期日期</span>
                                <span data-placehold='{$loan_number}'>借款编号</span>
                                <span data-placehold='{$get_year}'>年</span>
                                <span data-placehold='{$get_month}'>月</span>
                                <span data-placehold='{$get_day}'>日</span>
                                <span data-placehold='{$date}'>日期</span>
                                <span data-placehold='{$interest}'>利率</span>
                            </div>
                        </div>
                        <!-- 120px只用作站位，无意义 -->
                        <%--<div style="height: 120px;"></div>--%>
                    </div>

                    <div class="input-word input-title-first D-messg-span messg-fixed2">
                        <p class="D-rep">把鼠标键入到要显示内容位置，然后点击下面要显示的字段</p>
                        <span data-placehold='{$contract_no}'>合同编号</span>
                        <span data-placehold='{$real_name}'>借款人1</span>
                        <span data-placehold='{$mate_name}'>借款人2</span>
                        <span data-placehold='{$id_card}'>借款人1身份证号码</span>
                        <span data-placehold='{$mate_id_card}'>借款人2身份证号码</span>
                        <span data-placehold='{$resident_place}'>户口所在地</span>
                        <span data-placehold='{$now_address}'>居住地址</span>
                        <span data-placehold='{$cellphone}'>借款人1手机号码</span>
                        <span data-placehold='{$mate_cellphone}'>借款人2手机号码</span>
                        <span data-placehold='{$payee}'>收款人</span>
                        <span data-placehold='{$bank}'>开户银行</span>
                        <span data-placehold='{$account}'>收款账号</span>
                        <%--<span data-placehold='{a_brand}'>品牌型号</span>
                        <span data-placehold='{carframe_number}'>车架号</span>
                        <span data-placehold='{motor_number}'>发动机号</span>
                        <span data-placehold='{purchase_price}'>购买价格</span>
                        <span data-placehold='{car_color}'>车身颜色</span>
                        <span data-placehold='{plate_number}'>车牌号码</span>--%>
                        <span data-placehold='{$getLoan_upper}'>借款金额 大写</span>
                        <span data-placehold='{$getLoan_lower}'>借款金额 小写</span>
                        <span data-placehold='{$loan_amount_upper}'>放款金额 大写</span>
                        <span data-placehold='{$loan_amount_lower}'>放款金额 小写</span>
                        <%--<span data-placehold='{$interest}'>利率</span>--%>
                        <span data-placehold='{$at_name}'>借款期限</span>
                        <span data-placehold='{$loan_time}'>借款开始日期</span>
                        <span data-placehold='{$due_time}'>借款到期日期</span>
                        <span data-placehold='{$loan_number}'>借款编号</span>
                        <span data-placehold='{$get_year}'>年</span>
                        <span data-placehold='{$get_month}'>月</span>
                        <span data-placehold='{$get_day}'>日</span>
                        <span data-placehold='{$date}'>日期</span>
                        <span data-placehold='{$interest}'>利率</span>
                    </div>
                    <%--<div class="public-bgBotBtn">--%>
                    <%--<button ng-click="btn1()" style="width: auto;" class="btn-change">确认提交</button>--%>
                    <%--</div>--%>
                </div>
            </renewtemplate-input>
        </div>
        {{/each}}

    </script>
    <!--中间可切换内容 public-content样式用作中间切换容器-->
    <!--还款计划表-->
    <div id="selectFundPlan_content" class="public-content">
        <div class="public-content">
            <div class="public-content-title">
                <span>借款编号：</span>
                <span id="repayNumber" class="public-content-Po ">{{content.order.loanNumber}}</span>
            </div>
            <table class="public-content-tab csl-table">
                <thead>
                </thead>
                <tbody>
                <!--第一行-->
                <tr>
                    <td>借款人(甲方)</td>
                    <td id="aRealName" colspan="4" class="keyInfo ">{{content.realName}}</td>

                    <td>身份证号码</td>
                    <td id="aidCard" colspan="4" class="keyInfo ">{{content.idCard}}</td>
                </tr>
                <!--第二行-->
                <tr>
                    <td>贷款人（乙方）</td>
                    <td colspan="9" class="keyInfo command">
                        <div style="float:left" class="se-re tdSelect" style="text-indent: 1em;">
                            <select id="lender_list" ng-options="item.ID as item.name for item in selejia1" ng-model="data.addrProvince " ng-change="selectjia('a')" class="ng-pristine ng-untouched ng-valid ng-empty selectjia_a">
                                <option value="" selected="selected">选择贷款人</option>
                            </select>
                            <script type="text/x-handlebars-template" id="lender_list_tpl">
                                <option value="" selected="selected">选择贷款人</option>
                                {{#each content}}
                                <option value="{{id}}">{{first_party}}</option>
                                {{/each}}
                            </script>
                            <span class="se-po se-po-inputTem"></span>
                        </div>
                        <div id="b-name" class="b-name" style="float: left; margin-top: 5px;"></div>
                        <div id="b-id-num" class="b-id-num" style="float: left; margin-top: 5px;"></div>
                        <div id="province_list" style="float: left; margin-top: 5px;"></div>
                        <div id="city_list" style="float: left; text-indent: initial; margin-top: 5px;"></div>
                        <div id="area_list" style="float: left; text-indent: initial; margin-top: 5px;"></div>
                        <div id="address" style="float: left; margin-top: 5px;"></div>
                        <!-- ngIf: sid!=10 -->
                        <!-- ngIf: sid==10 --><%--<input id="b-name" type="text" autocomplete="off" ng-if="sid==10"
                                                     placeholder="请输入姓名"
                                                     ng-model="param.first_party"
                                                     value="{{content.order.first_party}}"
                                                     style=" float: left;margin-left: 15px;"
                                                     class="ng-pristine ng-untouched ng-valid  ng-empty b-name">
                        <!-- end ngIf: sid==10 -->
                        <!-- ngIf: sid==10 --><input id="b-id-num" type="text" autocomplete="off" ng-if="sid==10"
                                                     style="margin:0 15px; float: left; width:200px;"
                                                     placeholder="请输入身份证号" ng-model="param.first_party_idcard"
                                                     value="{{content.order.first_party_idcard}}"
                                                     class="ng-pristine ng-untouched ng-valid  ng-empty b-id-num">--%>
                        <!-- end ngIf: sid==10 -->
                        <%--<!-- ngIf: sid==10 --><input type="text" autocomplete="off" ng-if="sid==10" style="width:500px;" placeholder="请输入地址"--%>
                        <%--ng-model="param.first_party_address"--%>
                        <%--class="ng-pristine ng-untouched ng-valid  ng-empty b-address">--%>
                        <!-- end ngIf: sid==10 -->
                        <%--<div class="se-re tdSelect" style="text-indent: -2em;">
                            <select style="color:inherit" id="province_list" class="selectjia_a">
                                <option value="" selected="selected">居住区域</option>
                            </select>
                            <script type="text/x-handlebars-template" id="province_list_tpl">
                                <option value="" selected="selected">居住区域</option>
                                {{#each .}}
                                <option value="{{ID}}">{{name}}</option>
                                {{/each}}
                            </script>
                            <span class="se-po se-po-inputTem"></span>
                        </div>
                        <div class="se-re tdSelect" style="text-indent: 1em;">
                            <select style="color:inherit" id="city_list" ng-options="item.ID as item.name for item in selejia1" ng-model="data.addrProvince " ng-change="selectjia('a')" class="ng-pristine ng-untouched ng-valid ng-empty selectjia_a">
                                <option value="" selected="selected">选择市</option>
                            </select>
                            <script type="text/x-handlebars-template" id="city_list_tpl">
                                <option value="" selected="selected">选择市</option>
                                {{#each .}}
                                <option value="{{ID}}">{{name}}</option>
                                {{/each}}
                            </script>
                            <span class="se-po se-po-inputTem"></span>
                        </div>
                        <div class="se-re tdSelect" style="text-indent: 1em;">
                            <select style="color:inherit" id="area_list" ng-options="item.ID as item.name for item in selejia1" ng-model="data.addrProvince " ng-change="selectjia('a')" class="ng-pristine ng-untouched ng-valid ng-empty selectjia_a">
                                <option value="" selected="selected">选择区县</option>
                            </select>
                            <script type="text/x-handlebars-template" id="area_list_tpl">
                                <option value="" selected="selected">选择区县</option>
                                {{#each .}}
                                <option value="{{ID}}">{{name}}</option>
                                {{/each}}
                            </script>
                            <span class="se-po se-po-inputTem"></span>
                        </div>
                        <input id="address" value="{{content.order.first_party_address}}"
                               style="width: 217px !important;"
                               ng-class="{'error':err.address}"
                               ng-focus="remFocus()"
                               type="text" autocomplete="off"
                               placeholder="请输入详细地址"
                               ng-model="data.perInfo.address"/>--%>
                    </td>
                </tr>
                <!--第三行-->
                <tr>
                    <td>关联合同编号</td>
                    <td id="aContractNo" colspan="9" class="keyInfo ">{{content.order.contractNo}} 的贷款合同</td>
                </tr>
                <tr>
                    <td>客户姓名</td>
                    <td id="bRealName" colspan="3" class="keyInfo ">{{content.realName}}</td>
                    <td>贷款发放日期</td>
                    <td class="keyInfo">
                        <!-- ngIf: sid!=10 -->
                        <!-- ngIf: sid==10 --><input type="text" autocomplete="off" ng-if="sid==10"
                                                     style="margin:0 auto" id="time"
                                                     ng-init="inittime()" ng-model="param.loanTime"
                                                     value="{{content.order.loanTime}}"
                                                     class="ng-pristine ng-untouched ng-valid  ng-empty datepicker b-date">
                        <!-- end ngIf: sid==10 -->
                    </td>
                    <td>借款金额/元</td>
                    <td id="bApplyMoney" class="keyInfo">
                        <div id="applyMoney" style="text-align: center; text-indent: 0"></div>
                        <div id="CApplayMoney" class="public-content-chinese "></div>
                    </td>
                    <td>放款金额/元</td>
                    <td id="outMoney" class="keyInfo ">
                        <div id="money" style="text-align: center; text-indent: 0"></div>
                        <div id="COutMoney" class="public-content-chinese "></div>
                    </td>
                </tr>
                </tbody>
            </table>

            <%--计划表部分--%>
            <div id="selectFundPlan_div"></div>
            <script id="selectFundPlan_tpl" type="x-handlebars-template">

                <table class="public-content-tab csl-table " ng-if="data.orderSortList.length > 0">
                    <!--评估师-->
                    <thead></thead>
                    <tbody>
                    <tr>
                        <td colspan="8" class="lineGap"></td>
                    </tr>
                    </tbody>
                    <tbody>

                    {{#if content.orderSortList}}
                    <!--第一行-->
                    <tr class="thead">
                        <td>期数</td>
                        <td>还款日期</td>
                        <td>每月/最终还款本金</td>
                        <td>每月/每日还款利息</td>
                        <td>合计</td>
                    </tr>

                    {{#each content.orderSortList}}
                    <tr class="csl-tr " >
                        <td class="">{{periods}}</td>
                        <td class="">{{repayment_time}}</td>
                        <td class="">￥{{#thounsandBit is_month_repayment_money}}{{/thounsandBit}}</td>
                        <td class="">￥{{#thounsandBit is_moth_repayment_rate}}{{/thounsandBit}}</td>

                        <td class="">
                            {{#IF_EQ ../order.repayment_way 4}}
                                {{is_month_repayment_money}}×{{is_moth_repayment_rate}}×借款天数
                            {{else}}
                                {{#IF_EQ @index 0}}
                                ￥{{#add is_month_repayment_money is_moth_repayment_rate comprehensive}}{{/add}}
                                {{else}}
                                ￥{{#add is_month_repayment_money is_moth_repayment_rate 0}}{{/add}}
                                {{/IF_EQ}}
                            {{/IF_EQ}}
                        </td>

                    </tr>
                    {{/each}}
                    {{else}}
                    {{/if}}

                    </tbody>
                    <!--面审风控-->
                </table>
            </script>
            <!-- ngIf: data.orderSortList.length > 0 -->
            <div id="content">
                <span ng-bind-html="dataDoc.content | trustHtml" class=""></span>
            </div>
            <!--借款人签字部分-->
            <div style="position: relative;padding-top: 20px;" ng-init="initbtn()">
                <b>借款人（签字）：</b>
                <span class="unload"><span class="em"><input readonly="readonly" style="width: auto!important;"
                                                             type="text" autocomplete="off"
                                                             id="url" placeholder="上传借款人签名扫描件"></span></span>
                <span id="picker" style="cursor: pointer;" data-id="借款人签名" class="viewPic tabeem emwhite webuploader-container"><div
                        class="webuploader-pick">浏览本地</div><div id="rt_rt_1cd759ceg1ic2jiimsqq14948b"
                                                                style="position: absolute; top: 0px; left: 6px; width: 56px; height: 33px; overflow: hidden; bottom: auto; right: auto;">
            <label
                        style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></span>
                <span id="gallery" attachid="借款人签名">
            </span></div>
        </div>
    </div>


<%--<span style="display: none;" id="doc_id{{content.order.id}}">{{content.order.id}}</span>--%>



    <!--底部提交评估按钮-->
    <!-- ngIf: sid==10 -->
    <div class="public-bgBotBtn " ng-if="sid==10">
        <button ng-click="btn()" class="commit_repayPaln">保存</button>
        <button ng-click="btn()" class="preview_repayPaln">预览</button>

    </div><!-- end ngIf: sid==10 -->
</div>


<!-- 加载编辑器的容器 -->

<!-- 配置文件 -->
<script type="text/javascript" src="static/plugins/ueditor/ueditor.config.js?_v=190102162154"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="static/plugins/ueditor/ueditor.all.js?_v=190102162154"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript" src="static/js/jquery-plugin/Intelligent_association.js?_v=190102162154"></script>


<%--<script type="text/javascript" src="static/js/page/loanBefore/orderIn.js"></script>--%>
<%--<script type="text/javascript" src="static/js/page/loanIng/repayPlan.js"></script>--%>
